<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<jsp:include page="head.jsp"></jsp:include>
<head>
	<link rel="StyleSheet" href="css/ctreeselector.css" type="text/css" />
	<script type="text/javascript" src="scripts/ctreetable.js"></script>
	<script type="text/javascript" src="scripts/stringBuffer.js"></script>
	<script type="text/javascript" src="scripts/ctreeselector.js"></script>
	<script type="text/javascript">
		dr = new cTreeTable('dr',1);
		dr.config.useSelection = true;
		dr.config.rowSelection = false;
		dr.config.closeSameLevel = true;
		dr.config.useChecks = true;
		dr.config.folderChecks = true;
		dr.config.checkSubs = true;
		dr.config.showBadNodes = true;
		//dr.config.validLevel = 2;
		//dr.config.stepDepth = 1;
		dr.config.iconPath = 'img/';
		//d.config.useLines = false;
		dr.add(0,-1,'My example tree');
		//d.add(100066, -3, 'error');
var max = 3;
		var startTime = new Date();
for(var a=1; a<=max; a++) {
	dr.add(''+a, 0, 'Node '+a);
}
for(var a=1; a<=max; a++) {
	for(var b=1; b<=max; b++) {
		var b1 = a * 100 + b;
		dr.add(''+b1, ''+a, 'Node '+a+'.'+b);
	}
}
for(var a=1; a<=max; a++) {
	for(var b=1; b<=max; b++) {
		var b1 = a * 100 + b;
		for(var c=1; c<=max; c++) {
			var c1 = b1 * 100 + c;
			dr.add(''+c1, ''+b1, 'Node '+a+'.'+b+'.'+c);
		}
	}
}

dr.add(348945, 384388, 'bad node');
dr.add(84954, 348945, 'good node');
		function showSelector(inputName) {
			dr.config.useChecks = false;
			var selector = getTreeSelector(dr, 'DIV1', inputName);
			selector.cssfile = "css/ctreeselector.css";
			selector.show();
		}
		
		function showChecker(inputName) {
			dr.config.useChecks = true;
			var selector = getTreeSelector(dr, 'DIV1', inputName);
			selector.cssfile = "css/ctreeselector.css";
			selector.show();
		}
	</script>
</head>

<body>
    <input type='text' name='function_name' class="selectorinput" value='' readonly onclick="showSelector('function_id');" size='50' />
    <input type='text' name='function_id' value='' readonly /><div id='DIV1'></div>
    <jsp:include page="foot.jsp"></jsp:include>
</body>
</html>